package JJJJJJava.loadandsave;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.sql.DataFrame;
import org.apache.spark.sql.SQLContext;
import org.apache.spark.sql.SaveMode;

/**
 * @Auther: Mengkunxuan
 * @Date:2018/9/2610:58
 * @Description:
 */
public class SaveModeTest {
    @SuppressWarnings("deprecation")
    public static void main(String[] args) {
        SparkConf conf = new SparkConf().setMaster("local").setAppName("SaveModeTest");
        JavaSparkContext sc = new JavaSparkContext(conf);
        SQLContext sqlContext = new SQLContext(sc);
        DataFrame peopleDF = sqlContext.read().format("json").load("C://");
        peopleDF.save("c:/","json",SaveMode.Append);
    }
}
